{% extends "base.html" %}
{% load i18n %}
{% block title%}{% trans "luca_customer_new_customer" %}{% endblock%}
{% block breadcrumbs%}<li><a href="/customer">{% trans "luca_customer_list" %}</a></li><li>{{customer.name}}</li>{% endblock%}

	
{% block content %}		
<div class="box-inner">
            <div class="box-header well" data-original-title="">
                <h2><i class="glyphicon glyphicon-edit"></i> {% trans "luca_customer_new_customer" %}</h2>

              
            </div>
            <div class="box-content">
                <form action="/customer/process_new/" role="form" method="POST">
                {% csrf_token %}
                    <div class="form-group">
                        <label for="exampleInputEmail1">{% trans "luca_customer_name" %}</label>
                        <input type="text" class="form-control required" name="name">
                    </div>
                 
               		<div class="form-group">
                        <label for="exampleInputEmail1">{% trans "luca_customer_group" %}</label>
                        <select class="form-control required" name="group">
                    	
                    		{% if group_list %}
						  
						    {% for group in group_list %}
							<option value="{{group.id}}">{{group.name}}</option>
							
						    {% endfor %}	
						{% endif %}
                    	</select>  
                    </div>
                    
                    <div class="form-group">
                        <label for="exampleInputEmail1">{% trans "luca_customer_location" %}</label>
                        <select class="form-control required" name="location">
                    		
                    		{% if location_list %}
						  
						    {% for location in location_list %}
							<option value="{{location.id}}">{{location.name}}</option>
							
						    {% endfor %}	
						{% endif %}
                    	</select>  
                    </div>
                    
                    
                    
                    <div class="form-group">
                        <label for="exampleInputEmail1">{% trans "luca_customer_telephone" %}</label>
                        <input type="text" class="form-control required" name="telephone" >
                    </div>
                
                   
                      <div class="checkbox">
                      	<input name="active" type="hidden" value="0">
                      	<label class="boolean optional" for="user_basic_active">
                      		<input class="boolean optional" id="user_basic_active" name="active" type="checkbox" value="1">
                      		{% trans "active" %}
                      		</label>
                      	</div>
                  
                    <button type="submit" class="btn btn-default">{% trans "create" %}</button>
                      </form>

            </div>
        </div>
       

{% endblock %}
